<?php
//Just a short piece of code to stop people from viewing unauthorized pages
if(!$_p->is_logged_in()) {
	$filename = explode('/', $_SERVER['SCRIPT_FILENAME']);
	echo('<script type="text/javascript">window.location="index.php?redirect=' . $filename[count($filename)-1]  . '"</script>');
	die('You need to log in to view this page');
}
?>